package com.blockmeta.bbs.immodule.adapter;

import androidx.annotation.Nullable;
import android.view.View;
import android.widget.LinearLayout;

import com.blockmeta.bbs.baselibrary.base.adapter.BaseAdapter;
import com.blockmeta.bbs.immodule.R;
import com.blockmeta.bbs.immodule.bean.UserPost;
import com.chad.library.adapter.base.BaseViewHolder;

import java.util.List;

public class personalHomeForumAdapter extends BaseAdapter<UserPost.PostList, BaseViewHolder> implements View.OnClickListener{
    public personalHomeForumAdapter(int layoutResId, @Nullable List<UserPost.PostList> data) {
        super(layoutResId, data);
    }


    @Override
    protected void convert(BaseViewHolder helper, UserPost.PostList item) {
        helper.setText(R.id.item_news_type2_title, item.getTitle());
        LinearLayout main = helper.getView(R.id.item_news_type2_main);
        main.setTag(item);
        main.setOnClickListener(this);
    }

    @Override
    public void onClick(View v) {
        UserPost.PostList item = (UserPost.PostList) v.getTag();

    }
}
